#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
void bubble_sort(int arr[], int sz)
{
	for (int i = 0; i < sz; i++)
	{
		int flag = 1;
		for (int j = 0; j < sz-i-1; j++)
		{
			if (arr[j] > arr[j + 1])
			{
				flag = 0;
				int temp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = temp;
			}
		}
		if (flag = 0)
			break;
	}

}
int main()
{
	int arr[] = { 3,1,7,5,8,9,0,2,6,4 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	bubble_sort(arr, sz);
	for (int i = 0; i < sz; i++)
	{
		printf("%d", arr[i]);
	}return 0;
}